import YchConstant from "@/api/YchConstant"; //接口模块配置项
import { axios } from "@/utils/request"; //请求
// ----------------------------年度考评----------------------------
// get
export const getActive = function(url,params) {
  return axios({
    url: YchConstant.SPZX_SPCY + url,
    params: params,
    method: "GET",
    url_1:'outside'
  });
}

// 药品生产年度考评模块接口

// 1 登记分页查询
export const scqueryPageList = function(params) {
  return axios({
    url: YchConstant.SPZX_SPCY + '/flow-ndkp/queryPageList',
    params: params,
    method: "GET",
    url_1:'outside'
  });
} 

// 1 登记删除
export const deleteMyNdkpJbxx = function(data) {
  return axios({
    url: YchConstant.SPZX_SPCY + '/flow-ndkp/deleteMyNdkpJbxx',
    params: data,
    method: "get",
    url_1:'outside'
  });
} 

// 2 登记
export const openMyNdkpJbxx = function(params) {
  return axios({
    url: YchConstant.SPZX_SPCY + '/flow-ndkp/openMyNdkpJbxx',
    params: params,
    method: "get",
    url_1:'outside'
  });
}

// 3登记提交保存
export const djNdkpJob = function(data) {
  return axios({
    url: YchConstant.SPZX_SPCY + '/flow-ndkp/djNdkpJob',
    data: data,
    method: "post",
    url_1:'outside'
  });
}

// 药品生产-流程分页
export const flowJobPage = function(params) {
  return axios({
    url: YchConstant.SPZX_SPCY + '/flow-ndkp/flowJobPage',
    params: params,
    method: "get",
    url_1:'outside'
  });
}


// 药品生产-根据流程id获取流程信息
export const queryJobByJobId = function(params) {
  return axios({
    url: YchConstant.SPZX_SPCY + '/flow-ndkp/queryJobByJobId',
    params: params,
    method: "get",
    url_1:'outside'
  });
}
// 药品生产-根据流程保存流程信息
export const saveFlow = function(data) {
  return axios({
    url: YchConstant.SPZX_SPCY + '/flow-ndkp/saveFlow',
    data: data,
    method: "post",
    url_1:'outside'
  });
}
// 药品生产-根据流程提交流程信息
export const submitFlow = function(data) {
  return axios({
    url: YchConstant.SPZX_SPCY + '/flow-ndkp/submitFlow',
    data: data,
    method: "post",
    url_1:'outside'
  });
}

// 药品生产-根据流程退回上一步流程信息
export const returnUpperFlowJob = function(params) {
  return axios({
    url: YchConstant.SPZX_SPCY + '/flow-ndkp/returnUpperFlowJob',
    data: params,
    method: "post",
    url_1:'outside'
  });
}

// 药品生产-流程监听
export const flowJkPage = function(params) {
  return axios({
    url: YchConstant.SPZX_SPCY + '/flow-ndkp/flowJkPage',
    params: params,
    method: "get",
    url_1:'outside'
  });
}

// 统计-下载
export const exportRckpJbxxDatas = function(params) {
  return axios({
    url: YchConstant.SPZX_SPCY + '/flow-ndkp/exportNdkpTjData',
    params: params,
    method: "GET",
    url_1:'outside',
    responseType: 'arraybuffer'
  });
}
